"use strict";var ze=Object.create;var Y=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Be=Object.getOwnPropertyNames;var Ke=Object.getPrototypeOf,Xe=Object.prototype.hasOwnProperty;var Ge=(e,t)=>{for(var o in t)Y(e,o,{get:t[o],enumerable:!0})},ye=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Be(t))!Xe.call(e,r)&&r!==o&&Y(e,r,{get:()=>t[r],enumerable:!(n=He(t,r))||n.enumerable});return e};var me=(e,t,o)=>(o=e!=null?ze(Ke(e)):{},ye(t||!e||!e.__esModule?Y(o,"default",{value:e,enumerable:!0}):o,e)),Je=e=>ye(Y({},"__esModule",{value:!0}),e);var Nt={};Ge(Nt,{Provider:()=>Ue,ReactReduxContext:()=>f,batch:()=>vt,connect:()=>We,createDispatchHook:()=>Pe,createSelectorHook:()=>ae,createStoreHook:()=>j,shallowEqual:()=>g,useDispatch:()=>je,useSelector:()=>we,useStore:()=>J});module.exports=Je(Nt);var qe=me(require("react")),$e=require("use-sync-external-store/with-selector.js");var z=me(require("react")),a="default"in z?z.default:z;var se=Symbol.for("react-redux-context"),pe=typeof globalThis<"u"?globalThis:{};function Ze(){if(!a.createContext)return{};let e=pe[se]??(pe[se]=new Map),t=e.get(a.createContext);return t||(t=a.createContext(null),e.set(a.createContext,t)),t}var f=Ze();var H=()=>{throw new Error("uSES not initialized!")};function V(e=f){return function(){return a.useContext(e)}}var B=V();var he=H,xe=e=>{he=e},Qe=(e,t)=>e===t;function ae(e=f){let t=e===f?B:V(e),o=(n,r={})=>{let{equalityFn:s=Qe,devModeChecks:c={}}=typeof r=="function"?{equalityFn:r}:r,{store:u,subscription:i,getServerState:p,stabilityCheck:P,identityFunctionCheck:l}=t(),T=a.useRef(!0),w=a.useCallback({[n.name](D){let d=n(D);if(!1){if((S==="always"||S==="once"&&T.current)&&!s(d,m))try{}catch(q){}if((x==="always"||x==="once"&&T.current)&&d===D)try{}catch(C){}}return d}}[n.name],[n,P,c.stabilityCheck]),y=he(i.addNestedSub,u.getState,p||u.getState,w,s);return a.useDebugValue(y),y};return Object.assign(o,{withTypes:()=>o}),o}var we=ae();var et=Symbol.for("react.element"),tt=Symbol.for("react.portal"),ot=Symbol.for("react.fragment"),rt=Symbol.for("react.strict_mode"),nt=Symbol.for("react.profiler"),st=Symbol.for("react.provider"),pt=Symbol.for("react.context"),at=Symbol.for("react.server_context"),Ce=Symbol.for("react.forward_ref"),ct=Symbol.for("react.suspense"),it=Symbol.for("react.suspense_list"),ce=Symbol.for("react.memo"),ut=Symbol.for("react.lazy"),Xt=Symbol.for("react.offscreen"),Gt=Symbol.for("react.client.reference"),Oe=Ce,be=ce;function Pt(e){if(typeof e=="object"&&e!==null){let t=e.$$typeof;switch(t){case et:{let o=e.type;switch(o){case ot:case nt:case rt:case ct:case it:return o;default:{let n=o&&o.$$typeof;switch(n){case at:case pt:case Ce:case ut:case ce:case st:return n;default:return t}}}}case tt:return t}}}function De(e){return Pt(e)===ce}function lt(e,t,o,n,{areStatesEqual:r,areOwnPropsEqual:s,areStatePropsEqual:c}){let u=!1,i,p,P,l,T;function w(S,m){return i=S,p=m,P=e(i,p),l=t(n,p),T=o(P,l,p),u=!0,T}function y(){return P=e(i,p),t.dependsOnOwnProps&&(l=t(n,p)),T=o(P,l,p),T}function D(){return e.dependsOnOwnProps&&(P=e(i,p)),t.dependsOnOwnProps&&(l=t(n,p)),T=o(P,l,p),T}function d(){let S=e(i,p),m=!c(S,P);return P=S,m&&(T=o(P,l,p)),T}function x(S,m){let C=!s(m,p),q=!r(S,i,m,p);return i=S,p=m,C&&q?y():C?D():q?d():T}return function(m,C){return u?x(m,C):w(m,C)}}function ie(e,{initMapStateToProps:t,initMapDispatchToProps:o,initMergeProps:n,...r}){let s=t(e,r),c=o(e,r),u=n(e,r);return lt(s,c,u,e,r)}function ue(e,t){let o={};for(let n in e){let r=e[n];typeof r=="function"&&(o[n]=(...s)=>t(r(...s)))}return o}function W(e){return function(o){let n=e(o);function r(){return n}return r.dependsOnOwnProps=!1,r}}function Re(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}function K(e,t){return function(n,{displayName:r}){let s=function(u,i){return s.dependsOnOwnProps?s.mapToProps(u,i):s.mapToProps(u,void 0)};return s.dependsOnOwnProps=!0,s.mapToProps=function(u,i){s.mapToProps=e,s.dependsOnOwnProps=Re(e);let p=s(u,i);return typeof p=="function"&&(s.mapToProps=p,s.dependsOnOwnProps=Re(p),p=s(u,i)),p},s}}function A(e,t){return(o,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function Me(e){return e&&typeof e=="object"?W(t=>ue(e,t)):e?typeof e=="function"?K(e,"mapDispatchToProps"):A(e,"mapDispatchToProps"):W(t=>({dispatch:t}))}function ge(e){return e?typeof e=="function"?K(e,"mapStateToProps"):A(e,"mapStateToProps"):W(()=>({}))}function dt(e,t,o){return{...o,...e,...t}}function Tt(e){return function(o,{displayName:n,areMergedPropsEqual:r}){let s=!1,c;return function(i,p,P){let l=e(i,p,P);return s?r(l,c)||(c=l):(s=!0,c=l),c}}}function Ee(e){return e?typeof e=="function"?Tt(e):A(e,"mergeProps"):()=>dt}function X(e){e()}function ft(){let e=null,t=null;return{clear(){e=null,t=null},notify(){X(()=>{let o=e;for(;o;)o.callback(),o=o.next})},get(){let o=[],n=e;for(;n;)o.push(n),n=n.next;return o},subscribe(o){let n=!0,r=t={callback:o,next:null,prev:t};return r.prev?r.prev.next=r:e=r,function(){!n||e===null||(n=!1,r.next?r.next.prev=r.prev:t=r.prev,r.prev?r.prev.next=r.next:e=r.next)}}}}var ke={notify(){},get:()=>[]};function G(e,t){let o,n=ke,r=0,s=!1;function c(D){P();let d=n.subscribe(D),x=!1;return()=>{x||(x=!0,d(),l())}}function u(){n.notify()}function i(){y.onStateChange&&y.onStateChange()}function p(){return s}function P(){r++,o||(o=t?t.addNestedSub(i):e.subscribe(i),n=ft())}function l(){r--,o&&r===0&&(o(),o=void 0,n.clear(),n=ke)}function T(){s||(s=!0,P())}function w(){s&&(s=!1,l())}let y={addNestedSub:c,notifyNestedSubs:u,handleChangeWrapper:i,isSubscribed:p,trySubscribe:T,tryUnsubscribe:w,getListeners:()=>n};return y}var St=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yt=typeof navigator<"u"&&navigator.product==="ReactNative",F=St||yt?a.useLayoutEffect:a.useEffect;function Ae(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function g(e,t){if(Ae(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let o=Object.keys(e),n=Object.keys(t);if(o.length!==n.length)return!1;for(let r=0;r<o.length;r++)if(!Object.prototype.hasOwnProperty.call(t,o[r])||!Ae(e[o[r]],t[o[r]]))return!1;return!0}var mt={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},ht={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xt={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},_e={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},wt={[Oe]:xt,[be]:_e};function Fe(e){return De(e)?_e:wt[e.$$typeof]||mt}var Ct=Object.defineProperty,Ot=Object.getOwnPropertyNames,ve=Object.getOwnPropertySymbols,bt=Object.getOwnPropertyDescriptor,Dt=Object.getPrototypeOf,Ne=Object.prototype;function U(e,t){if(typeof t!="string"){if(Ne){let s=Dt(t);s&&s!==Ne&&U(e,s)}let o=Ot(t);ve&&(o=o.concat(ve(t)));let n=Fe(e),r=Fe(t);for(let s=0;s<o.length;++s){let c=o[s];if(!ht[c]&&!(r&&r[c])&&!(n&&n[c])){let u=bt(t,c);try{Ct(e,c,u)}catch{}}}}return e}var Ie=H,Ve=e=>{Ie=e};var Rt=[null,null];function Mt(e,t,o){F(()=>e(...t),o)}function gt(e,t,o,n,r,s){e.current=n,o.current=!1,r.current&&(r.current=null,s())}function Et(e,t,o,n,r,s,c,u,i,p,P){if(!e)return()=>{};let l=!1,T=null,w=()=>{if(l||!u.current)return;let D=t.getState(),d,x;try{d=n(D,r.current)}catch(S){x=S,T=S}x||(T=null),d===s.current?c.current||p():(s.current=d,i.current=d,c.current=!0,P())};return o.onStateChange=w,o.trySubscribe(),w(),()=>{if(l=!0,o.tryUnsubscribe(),o.onStateChange=null,T)throw T}}function kt(e,t){return e===t}function At(e,t,o,{pure:n,areStatesEqual:r=kt,areOwnPropsEqual:s=g,areStatePropsEqual:c=g,areMergedPropsEqual:u=g,forwardRef:i=!1,context:p=f}={}){let P=p,l=ge(e),T=Me(t),w=Ee(o),y=!!e;return d=>{let x=d.displayName||d.name||"Component",S=`Connect(${x})`,m={shouldHandleStateChanges:y,displayName:S,wrappedComponentName:x,WrappedComponent:d,initMapStateToProps:l,initMapDispatchToProps:T,initMergeProps:w,areStatesEqual:r,areStatePropsEqual:c,areOwnPropsEqual:s,areMergedPropsEqual:u};function C(O){let[E,Z,R]=a.useMemo(()=>{let{reactReduxForwardedRef:h,...k}=O;return[O.context,h,k]},[O]),v=a.useMemo(()=>{let h=P;return E?.Consumer,h},[E,P]),b=a.useContext(v),N=!!O.store&&!!O.store.getState&&!!O.store.dispatch,Le=!!b&&!!b.store,M=N?O.store:b.store,le=Le?b.getServerState:M.getState,Q=a.useMemo(()=>ie(M.dispatch,m),[M]),[_,de]=a.useMemo(()=>{if(!y)return Rt;let h=G(M,N?void 0:b.subscription),k=h.notifyNestedSubs.bind(h);return[h,k]},[M,N,b]),Te=a.useMemo(()=>N?b:{...b,subscription:_},[N,b,_]),ee=a.useRef(void 0),te=a.useRef(R),I=a.useRef(void 0),fe=a.useRef(!1),oe=a.useRef(!1),re=a.useRef(void 0);F(()=>(oe.current=!0,()=>{oe.current=!1}),[]);let Se=a.useMemo(()=>()=>I.current&&R===te.current?I.current:Q(M.getState(),R),[M,R]),Ye=a.useMemo(()=>k=>_?Et(y,M,_,Q,te,ee,fe,oe,I,de,k):()=>{},[_]);Mt(gt,[te,ee,fe,R,I,de]);let L;try{L=Ie(Ye,Se,le?()=>Q(le(),R):Se)}catch(h){throw re.current&&(h.message+=`
The error may be correlated with this previous error:
${re.current.stack}

`),h}F(()=>{re.current=void 0,I.current=void 0,ee.current=L});let ne=a.useMemo(()=>a.createElement(d,{...L,ref:Z}),[Z,d,L]);return a.useMemo(()=>y?a.createElement(v.Provider,{value:Te},ne):ne,[v,ne,Te])}let $=a.memo(C);if($.WrappedComponent=d,$.displayName=C.displayName=S,i){let E=a.forwardRef(function(R,v){return a.createElement($,{...R,reactReduxForwardedRef:v})});return E.displayName=S,E.WrappedComponent=d,U(E,d)}return U($,d)}}var We=At;function Ft({store:e,context:t,children:o,serverState:n,stabilityCheck:r="once",identityFunctionCheck:s="once"}){let c=a.useMemo(()=>{let p=G(e);return{store:e,subscription:p,getServerState:n?()=>n:void 0,stabilityCheck:r,identityFunctionCheck:s}},[e,n,r,s]),u=a.useMemo(()=>e.getState(),[e]);return F(()=>{let{subscription:p}=c;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),u!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[c,u]),a.createElement((t||f).Provider,{value:c},o)}var Ue=Ft;function j(e=f){let t=e===f?B:V(e),o=()=>{let{store:n}=t();return n};return Object.assign(o,{withTypes:()=>o}),o}var J=j();function Pe(e=f){let t=e===f?J:j(e),o=()=>t().dispatch;return Object.assign(o,{withTypes:()=>o}),o}var je=Pe();var vt=X;xe($e.useSyncExternalStoreWithSelector);Ve(qe.useSyncExternalStore);0&&(module.exports={Provider,ReactReduxContext,batch,connect,createDispatchHook,createSelectorHook,createStoreHook,shallowEqual,useDispatch,useSelector,useStore});
//# sourceMappingURL=react-redux.production.min.cjs.map